﻿@model MvcIssueTracker.Models.Issue

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Issue</legend>

    <div class="display-label">Title</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Title)
    </div>

    <div class="display-label">Description</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Description)
    </div>

    <div class="display-label">CreatedBy</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.CreatedBy)
    </div>

    <div class="display-label">CreatedDate</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.CreatedDate)
    </div>

    <div class="display-label">AssignedTo</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.AssignedTo)
    </div>

    <div class="display-label">LastUpdatedDate</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.LastUpdatedDate)
    </div>

    <div class="display-label">ClosedBy</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ClosedBy)
    </div>

    <div class="display-label">ClosedDate</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ClosedDate)
    </div>
</fieldset>
<table>
 <thead>
   <tr>
     <th>Work Detail</th>
     <th>Entered By</th>
     <th>Date</th>
   </tr>
 </thead>
 <tbody>
   @foreach (var item in Model.WorkNotes)
   {
       <tr>
         <td>@item.Detail</td>
         <td>@item.EnteredBy</td>
         <td>@item.LoggedDate.ToShortDateString()</td>
       </tr> 
   }
 </tbody>
</table>
<p>
    @Html.ActionLink("Add Notes", "Create", "WorkNote") |
    @Html.ActionLink("Edit", "Edit", new { id=Model.IssueId }) |
    @Html.ActionLink("Back to List", "Index")
</p>
